﻿using System.Collections.Generic;
using Sportsbook.Domain.Models.Menus;
using Sportsbook.Domain.Repositories;
using Sportsbook.InMemoryPersistence.Models.Menus;

namespace Sportsbook.InMemoryPersistence.Repositories
{
    public class MenusRepository : IMenusRepository
    {
        private List<Menu> GetList()
        {
            return new List<Menu>
            {
                new Menu
                {
                    Items = new List<IMenuItem>(){
                        new MenuItem
                        {
                            Name = "Soccer",
                            SubItems = new List<SubItem>
                            {
                                SubItem.AllEvents,
                                SubItem.EarlyMarket,
                                SubItem.FirstHalf,
                                SubItem.Live
                            }
                        },
                        new MenuItem
                        {
                            Name = "Basketball",
                            SubItems = new List<SubItem>
                            {
                                SubItem.AllEvents,
                                SubItem.EarlyMarket,
                                SubItem.FirstHalf,
                                SubItem.Live
                            }
                        }
                    }
                }
            };
        }

        public IMenu Get()
        {
            return GetList()[0];
        }
        public IMenu Get(string customerId)
        {
            return GetList()[0];
        }
    }
}